<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(item, index) in music">{{item.name}} -- {{index}}</li>
        </ul>

        <ul>
            <li v-for="(item,index) in obj">{{item}} -- {{index}}</li>
        </ul>
    </div>
    
</body>
   
<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    var vm =new Vue({
        el:'#app',
        data:{
            music:[
                {name:'青花瓷'},
                {name:'Happy New Year'},
                {name:'ten years'}
            ],
            obj:{
                name:'句号',
                age:18,
                sex:'man'
            }
        }
        
    })

    /*
    v-for 循环，可以以循环数组和对象

    语法：v-for="(item,index) in 需要循环的变量"
    */
</script>
</html>